package com.amazon.advertising.api;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import ie.dit.comp.lukejia.fyp.model.RatingAndReview;

import org.junit.Test;

public class GetReviewParserTest {

	@Test
	public void test() {
		String url = "http://www.amazon.com/Steve-Jobs-Walter-Isaacson/product-reviews/1451648537/ref=cm_cr_dp_all_summary?ie=UTF8&showViewpoints=1&sortBy=bySubmissionDateDescending";
		RatingAndReview rar = GetReviewParser.getAmazonReviewFromURL(url);
		assertNotNull(rar);
		assertEquals(5, rar.getRatings().length);
		assertEquals(10, rar.getReviews().size());
	}

}
